package org.dtrd.modules.dict.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.dict.entity.bean.BankInfoDetail;

import java.util.Date;


/**
 * <p>
 * 
 * </p>
 *
 * @author QR
 * @since 2021-12-13
 */
@Getter
@Setter
@TableName("dtrd_ent_rd_dic_bank")
public class DtrdEntRdDicBank {

    @TableId(value = "data_id", type = IdType.AUTO)
    private Integer dataId;

    @TableField("bank_name")
    private String bankName;

    @TableField("bank_description")
    private String bankDescription;

    @TableField("bank_img")
    private String bankImg;

    @TableField("bank_icon")
    private String bankIcon;

    @TableField("create_time")
    private Date createTime;

    @TableField("is_del")
    @TableLogic
    private Integer isDel;

    public DtrdEntRdDicBank init() {
        createTime = new Date();
        isDel = 0;
        return this;
    }

    public DtrdEntRdDicBank parseFromDto(BankInfoDetail dto) {
        dataId = dto.getDataId();
        bankName = dto.getBankName();
        bankDescription = dto.getBankDescription();
        bankImg = dto.getBankImg();
        bankIcon = dto.getBankIcon();
        return this;
    }


}
